package Simulation;

import java.util.ArrayList;

import com.badlogic.gdx.graphics.g2d.Sprite;
import com.me.mynanogame.StaticSprites;

public class Gem extends Sprite{
	public GemType type;
	public Sprite gemSprite;
	public boolean taken;
	
	public enum GemType{
		GOLD,
		SILVER,
		RED,
		YELLOW,
		GREEN,
		BLUE,
		PURPLE,
		WHITE,
		BLACK
	}
	
	public Gem(GemType type){
		this.type = type;
		taken = false;
	}

	public Sprite getGem(int index){
		if(this.type == GemType.GOLD){
			gemSprite = StaticSprites.gold[index];
		}
		else if(this.type == GemType.SILVER){
			gemSprite = StaticSprites.silver[index];
		}
		else if(this.type == GemType.RED){
			gemSprite = StaticSprites.red[index];
		}
		else if(this.type == GemType.YELLOW){
			gemSprite = StaticSprites.yellow[index];
		}
		else if(this.type == GemType.GREEN){
			gemSprite = StaticSprites.green[index];
		}
		else if(this.type == GemType.BLUE){
			gemSprite = StaticSprites.blue[index];
		}
		else if(this.type == GemType.PURPLE){
			gemSprite = StaticSprites.purple[index];
		}
		else if(this.type == GemType.WHITE){
			gemSprite = StaticSprites.white[index];
		}
		else if(this.type == GemType.BLACK){
			gemSprite = StaticSprites.black;
		}
		return gemSprite;
	}
	
	public void setTaken(boolean b){
		this.taken = b;
	}
	
	public GemType getType(){
		return this.type;
	}
}
